#include<iostream>
#include<string>
#include<ctime>

using namespace std;

struct Student
{
	string name;
	int age;
	int score;
};

struct Teacher
{
	int id;
	string name;
	int age;
	struct Student stu;
};


int main()
{
	struct Teacher t;

	srand((unsigned int)time(NULL));

	t.id = rand() % 10000;
	t.name = "Linus";
	t.age = 67;
	t.stu.name = "Tom";
	t.stu.age = 21;
	t.stu.score = 87;

	cout << t.id << " " << t.name << " " << t.age << endl
		<< t.stu.name << " " << t.stu.age << " " << t.stu.score << endl;

	system("pause");

	return 0;
}